package com.arpa.wms.domain.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 出库单复核状态
 * @program: wms
 * @description:
 * @author: xuyang
 * @create: 2020-10-27 10:21
 */
public enum OutboundRecheckStatusEnum implements IEnum<String> {
    /**
     * 出库单复核状态
     */
    NOT_RECHECK("0", "未复核"),
    // 复核中用于出库明细表，复核确认表不会使用
    RECHECKING("1", "复核中"),
    RECHECKED("2", "已复核"),
    CANCEL_OUT("5", "取消出库");

    /**
     * 值
     */
    private final String value;

    /**
     * 描述
     */
    private final String desc;

    OutboundRecheckStatusEnum(final String value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String translate(String value){
        for (OutboundRecheckStatusEnum ele : values()) {
            if(ele.getValue().equals(value)) {
                return ele.getDesc();
            }
        }
        return value;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    @Override
    public String toString(){
        return this.desc;
    }

    public String getDesc() {
        return this.desc;
    }
}
